<template>
  <transition :name="fadename">
    <slot></slot>
  </transition>
</template>

<script>
export default {
  name: 'FadeAnimation',
  props: {
    fadename: String
  }
}
</script>

<style lang="stylus" scoped>
  .v-enter, .v-leave-to
    opacity: 0
  .v-enter-active, .v-leave-active
    transition: opacity .5s
.slide-right-enter-active,
.slide-right-leave-active,
.slide-left-enter-active,
.slide-left-leave-active
  will-change: transform;
  transition: all 500ms;
  position: absolute;
  width:100%
.slide-right-enter
  opacity: 0
  transform: translate3d(-100%, 0, 0)
.slide-right-leave-active
  opacity: 0
  transform: translate3d(100%, 0, 0)
.slide-left-enter 
  opacity: 0
  transform: translate3d(100%, 0, 0)
.slide-left-leave-active 
  opacity: 0
  transform: translate3d(-100%, 0, 0)
</style>
